#include <stdio.h>
#include <stdlib.h>
unsigned long int fact (int m);//计算阶乘

int main(int argc, char *argv[])
{
	int n;
	unsigned long int g;

	n = atoi(argv[1]);
	//把字符串转换为整型数, 取第二个参数。第一个参数固定为应用程序的名称

	g = fact (n);
	printf("%ld", g);
	return (1);
}
unsigned long int fact(int m)
{
	if (m <= 1)
		return (1);
	return (m * fact(m - 1));
}


